export const log = {
  appenders: {
    activeLog: {
      filename: './log/status',
      type: 'dateFile',
      pattern: '.dd.log',
      daysToKeep: 25,
      alwaysIncludePattern: true
    },
    errorLog: {
      type: 'file',
      filename: 'log/errors.log'
    },
    http: {
      type: 'dateFile',
      filename: 'log/http.log',
      pattern: '-yyyy-MM-dd',
      category: 'http'
    },
    email: {
      type: '@log4js-node/smtp',
      plugin: 'smtp',
      SMTP: {
        pool: true,
        host: 'smtp.mxhichina.com',
        port: 465,
        secure: true,
        auth: {
          user: 'solutions@purearea.com.cn',
          pass: 'Hrds20028916'
        }
      }
    }
  },
  categories: {
    default: {
      appenders: ['activeLog'],
      level: 'debug'
    },
    http: {
      appenders: ['http'],
      level: 'info'
    },
    error: {
      appenders: ['errorLog', 'email'],
      level: 'warn'
    }
  }
};
